﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class HomePage : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

            if (Request.Cookies["UserName"] != null)
            {
                Session.SetCurrentUser(Server.HtmlEncode(Request.Cookies["UserName"].Value));
            }
            
            if (Session.GetCurrentUser() == null)
            {
                page_title.Text = "You aren't login!";
            }
            else
                page_title.Text = String.Format("Welcome {0}!", Session.GetCurrentUser());

    }
}